package student.aistar.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import student.aistar.mapper.UserMapper;
import student.aistar.model.bo.Result;
import student.aistar.model.entity.Address;
import student.aistar.model.entity.User;

import java.util.List;

@RestController
@RequestMapping("/uuu")
public class UUUController {

    @Autowired
    private UserMapper userMapper;

    @GetMapping
    @ResponseBody
    public Result get(){

        List<Address> addresses = userMapper.selectAddressById(1);

        return new Result("200","查询成功",addresses);
    }
}
